//
//  tongZhiDetailViewController.swift
//  AreaChainblock
//
//  Created by 赵佟越 on 2018/11/5.
//  Copyright © 2018年 zhaotongyue. All rights reserved.
//

import UIKit

class tongZhiDetailViewController: BaseViewController {
    let myWebView = UIWebView()
    var myModel :productModel?
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = XALanguageManager.getString(key: "通知详情")
        
    myWebView.scrollView.bounces=false
        
   
        
        var tempheight = CGFloat()
        tempheight = 64
        if #available(iOS 11.0.0, *) {
            tempheight = 0
            print("iOS 9.3.5 is available")
        }
        
        
        
        
         myWebView.frame = CGRect(x: 0, y: tempheight, width: kScreenWidth, height: kScreenHeight - tempheight)
    self.view.backgroundColor = UIColor.black
    self.view.addSubview(myWebView)
        
        let path = Bundle.main.bundlePath
        
        let url = URL.init(fileURLWithPath: path)
        
//        self.myWebView.delegate = self as! UIWebViewDelegate;
        
        self.myWebView.isOpaque = false; //不设置这个值 页面背景始终是白色
        
        self.myWebView.backgroundColor = UIColor.clear;

        self.myWebView.scrollView.isPagingEnabled = true;
        
        self.myWebView.scrollView.contentInset = UIEdgeInsetsMake(0, 0,0, 0);
       
        if XALanguageManager.getString(key: "语种") == "English" {
            myWebView.loadHTMLString((myModel?.e_content)! as String, baseURL: nil)
        }else{
            myWebView.loadHTMLString((myModel?.content)!, baseURL: nil)
        }
        
        
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
